<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>创业者服务首页</title>
		<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
		<link rel="stylesheet" href="../css/leftSidebar.css">
	</head>
	<style type="text/css">
		html,body{height: 100%;}
		.col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1300px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
		#myTab a{color: #7c7c7c;font-size: 15px;}
		#myTab>li.active>a{color: #3f4142; background-color: #fff;}
		.navbar-form{margin-top: 0;}
		.tab_creat .active{color:#cd121d;}
		.table{margin-bottom: 0;}
		div.tab_creat.row{background-color: #fff;}
		.tab_font{padding: 10px 0;}
		.tab_font div,.tab_font td{font-size: 14px;color: #919191;}
		.gongsi_list div.col-xs-2,.gongsi_list div.col-xs-3{padding-top:10px;padding-bottom: 10px;text-align: center;}
		.gongsi_list.row{padding: 20px;background-color: #fff;margin-top: 20px;border: 1px solid #ddd;}
		.gongsi_list dd div.col-xs-2{font-size: 14px;color: #4f5051;}
		.btn-success{background-color: #cd121d;border-color:#cd121d;}
		.btn-success:hover{background-color: #f8a719;}
		.btn-success:active{background-color: #f8a719;}
		.btn-success:active:focus{background-color: #f8a719;}
		.btn-success.focus, .btn-success:focus{background-color: #f8a719;}
		.btn{padding: 2px 10px;margin-top: 4px;}
		.row{margin: 0;}
		.btn-default{border-color: #cd121d;color: #cd121d;}
		.list_choose li{width: 10%;float: left;padding: 8px;cursor: pointer;}
		.pagination{float: right !important;}

	</style>
	<body style="background-color: #f2f2f2;">
		<div class="row warp" style="height: 100%;">
			<div class="nav_right_head">
				<a href="../index.html"><img src="../img/roleIndexBg.jpg"  /></a>
			</div>
			<!--左侧导航-->
			<div class="col-xs-2 nav_left">
				<div class="creatNav">技术需求服务</div>
				<div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，技术需求者</a></div>
				<div class="list-group" style="padding: 0;">
					<a href="xqfb_index.html" class="list-group-item active"><i class="glyphicon glyphicon-home"></i> 首页</a>
					<a href="xqfb_fbdxq.html" class="list-group-item"><i class="glyphicon glyphicon-cd"></i> 发布的需求</a>
					<a href="xqfb_jsdd.html" class="list-group-item"><i class="glyphicon glyphicon-list-alt"></i> 接收的订单</a>
					<a href="xqfb_fbcg.html" class="list-group-item"><i class="glyphicon glyphicon-export"></i> 发布的成果</a>
					<a href="xqfb_gmcg.html" class="list-group-item " ><i class="glyphicon glyphicon-shopping-cart"></i> 购买的成果</a>
					<a href="xqfb_mynews.html" class="list-group-item"><i class="glyphicon glyphicon-book"></i> 我的消息</a>

				</div>
				<div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
			</div>

			<div class="col-xs-12 nav_right">

				<div class="row" style="margin-top: 10px;">
					<div class="col-xs-10 col-xs-offset-1" >
						<div class="row">
							<ul id="myTab" class="nav nav-pills navbar-left">
								<li class="active"><a href="#home" data-toggle="tab">技术成果</a></li>
								<li><a href="#touzi" data-toggle="tab">技术需求</a></li>
							</ul>
							<div class="navbar-form navbar-right col-xs-6">
								<div class="form-group has-error has-feedback">
									<input type="text" class="form-control" id="keyword" aria-describedby="inputSuccess2Status" placeholder="输入创业项目、投资人、导师、技术名称搜索">
									<span class=" glyphicon glyphicon-zoom-in form-control-feedback" aria-hidden="true"></span>
									<span id="inputSuccess2Status" class="sr-only">(success)</span>
								</div>
							</div>
						</div>

						<div id="myTabContent" class="tab-content" style="">

							<!--技术成果-->
							<div class="tab-pane fade in active" id="home">

								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">创业领域:<span class="caret bussinessFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose creat_area">
											<li class="active" chooseId=''>全部</li>

										</ul>
									</div>
								</div>


								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">地区:<span class="caret areaFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose areas">
											<li class="active" chooseId=''>全部</li>
										</ul>
									</div>
								</div>

								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">排序:<span class="caret orderFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose order">
											<li>最近收录</li><li>热度</li><li>相关度</li>
										</ul>
									</div>
								</div>

								<div class="tab_creat row tab_font">

									<div class="form-group">
										<label class="col-sm-2 control-label" for="creatTime" style="font-weight: normal;display: inline-block;margin-top: 8px;">项目注册时间</label>
										<div class="col-sm-3">
											<select class="form-control" id="creatTime">
												<option value="">全部</option>
												<option value="2017">2017</option>
												<option value="2016">2016</option>
												<option value="2015">2015</option>
												<option value="2014">2014</option>
												<option value="2013">2013</option>
											</select>
										</div>

										<button type="button" class="btn btn-success" id="startSearch" style="width: 70px;margin-left: 50px;">确认</button>

									</div>

								</div>
								<div class="row gongsi_list">
									<dl style="background-color: #fff;" >
										<dt>
										<div class="row">
										<div class="col-xs-3">技术名称</div>
										<div class="col-xs-2">发布地区</div>
										<div class="col-xs-3">技术领域</div>
										<div class="col-xs-2">成果发布时间</div>
										<div class="col-xs-2">售价</div>
										</dt>
										<div>
											<div id="company_list">

											</div>
											<ul class="pagination pull-right" id="page">

											</ul>
										</div>

										<!--<dd>
											<div class="row">
												<div class="col-xs-2" style="padding-top:3px ;"><img src="../img/carous.png" style="width: 40px;height: 40px;"/> <a href="cyzfw_myProgress_xq.html" >小橙科技</a></div>
												<div class="col-xs-2">湖北</div>
												<div class="col-xs-2">未融资</div>
												<div class="col-xs-2">生活消费</div>
												<div class="col-xs-2">2015-06-11</div>
												<div class="col-xs-2">7.5</div>
											</div>
										</dd>-->


									</dl>
								</div>
							</div>

							<!--技术需求-->
							<div class="tab-pane fade" id="touzi">
								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">技术领域:<span class="caret tutorInvesetFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose touzhi_area">
											<li class="active" chooseId=''>全部</li>
										</ul>
									</div>
								</div>
								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">地区:<span class="caret tutorAreaFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose areas_touzi">
											<li class="active" chooseId=''>全部</li>
										</ul>
									</div>
								</div>

								<div class="tab_creat row tab_font">
									<div class="col-xs-2 text-right" style="padding: 8px 15px;">排序:<span class="caret tutorOrderFolded foldedtog"></span></div>
									<div class="col-xs-10" style="padding: 0;">
										<ul class="list-unstyled clearfix list_choose order_touzi">
											<li>最近收录</li><li>热度</li><li>相关度</li>
										</ul>
									</div>
								</div>

								<div class="tab_creat row tab_font">

									<div class="form-group">
										<label class="col-sm-2 control-label" for="creatTime" style="font-weight: normal;display: inline-block;margin-top: 8px;">项目注册时间</label>
										<div class="col-sm-3">
											<select class="form-control" id="techniqueDemand">
												<option value="2017">2017</option>
												<option value="2016">2016</option>
												<option value="2015">2015</option>
												<option value="2014">2014</option>
												<option value="2013">2013</option>
											</select>
										</div>

										<button type="button" class="btn btn-success" id="startSearch_touzi" style="width: 70px;margin-left: 50px;">确认</button>

									</div>

								</div>


								<div class="row gongsi_list">
									<dl style="background-color: #fff;">
										<dt>
										<div class="row">
											<div class="col-xs-3">需求名称</div>
											<div class="col-xs-2">发布地区</div>
											<div class="col-xs-3">技术领域</div>
											<div class="col-xs-2">发布时间</div>
											<div class="col-xs-2">悬赏金额</div>
										</div>
										</dt>
										<!--<dd>-->
										<!--<div class="row">-->
										<!--<div class="col-xs-2" style="padding-top: 10px;">-->
										<!--<div class="media">-->
										<!--<div class="media-left media-middle">-->
										<!--<a href="#">-->
										<!--<img src="../img/carous.png" style="width: 40px;height: 40px;" alt="../img/defaultAvatar.png"/> -->
										<!--</a>-->
										<!--</div>-->
										<!--<div class="media-body">-->
										<!--<span>小橙科技</span>-->
										<!---->
										<!--</div>-->
										<!--</div>-->
										<!---->
										<!--</div>-->
										<!--<div class="col-xs-2">2</div>-->
										<!--<div class="col-xs-2">天使轮</div>-->
										<!--<div class="col-xs-2">电子商务</div>-->
										<!--<div class="col-xs-2">2015-06-11</div>-->
										<!--<div class="col-xs-2"><button class="btn btn-default ">关注</button></div>-->
										<!--</div>-->
										<!---->
										<!--</dd>-->
										<div>
											<div id="touzi_list"></div>

										</div>
										<ul class="pagination pull-right" id="pageInvest">

										</ul>


									</dl>
								</div>


							</div>


						</div>
					</div>

				</div>


			</div>

			<!--<div class="col-xs-12 nav_right">-->
				<!--<div class="nav_right_head">-->
					<!--<a href="../index.html"><img src="../img/linder_bg.png"/></a>-->
				<!--</div>-->
				<!---->
				<!---->
			<!---->
					<!--<div class="row" style="margin-top: 10px;">-->
						<!--<div class="col-xs-10 col-xs-offset-1" >-->
							<!--<div class="row">-->
								<!--<ul id="myTab" class="nav nav-pills navbar-left">-->
									<!--<li class="active"><a href="#home" data-toggle="tab">技术成果</a></li>-->
									<!--<li><a href="#touzi" data-toggle="tab">技术需求</a></li>-->
								<!--</ul>-->
								  <!--<form class="navbar-form navbar-right col-xs-6">-->
							        <!--<div class="form-group has-success has-feedback">								-->
									  <!--<input type="text" class="form-control" id="inputSuccess2" aria-describedby="inputSuccess2Status" placeholder="输入创业项目、投资人、导师、技术名称搜索">-->
									  <!--<span class=" glyphicon glyphicon-zoom-in form-control-feedback" aria-hidden="true"></span>-->
									  <!--<span id="inputSuccess2Status" class="sr-only">(success)</span>-->
									<!--</div>-->
							      <!--</form>-->
							<!--</div>-->
							<!---->
							<!--<div id="myTabContent" class="tab-content" style="">-->
								<!--<div class="tab-pane fade in active" id="home">-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">融资阶段:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
												<!--<tr><td class="active">全部</td><td>种子轮</td><td>天使轮</td><td>Pre-A</td><td>A轮</td><td>A+轮</td><td>Pre-轮</td><td>B轮</td><td>B+轮</td><td>C轮</td></tr>-->
												<!--<tr><td>C+轮</td><td>D轮</td><td>E轮</td><td>pre-F</td><td>IPO</td><td>并购</td><td>战略投资</td><td>不明确</td><td>尚未或投</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">创业领域:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
												<!--<tr><td class="active">全部</td><td>电子商务</td><td>产品 A</td><td>企业服务</td><td>ARVR</td><td>生活消费</td><td>内容产业</td><td>pre-轮</td><td>游戏动漫</td><td>移动互联网</td><td>社交</td></tr>-->
												<!--<tr><td>硬件</td><td>教育</td><td>交通出行</td><td>医疗健康</td><td>旅游户外</td><td>工具软件</td><td>房产</td><td>不明确</td><td>尚未或投</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">地区:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
												<!--<tr><td class="active">全部</td><td>北京</td><td>上海</td><td>广东</td><td>浙江</td><td>江苏</td><td>山东</td><td>福建</td><td>湖北</td><td>其他地区</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">排序:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
												<!--<tr><td class="active">全部</td><td>最新收录</td><td>热度</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">时间:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
													<!--<div class="dropdown" style="display: inline-block;">-->
														  <!--<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">-->
														    <!--注册时间-->
														    <!--<span class="caret"></span>-->
														  <!--</button>-->
														  <!--<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">-->
														    <!--<li><a href="#">Action</a></li>-->
														  <!--</ul>-->
														  <!--<button type="button" class="btn btn-success" style="width: 70px;margin-left: 50px;">确认</button>-->
													<!--</div>-->
										<!--</div>-->
									<!--</div>-->
									<!---->
									<!--<div class="row gongsi_list">-->
										<!--<dl style="background-color: #fff;">-->
										<!--<dt>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2">技术名称</div>-->
												<!--<div class="col-xs-2">发布地区</div>-->
												<!--<div class="col-xs-2">技术领域</div>-->
												<!--<div class="col-xs-2">成果发布时间</div>-->
												<!--<div class="col-xs-2">售价</div>-->
												<!--<div class="col-xs-2">操作</div>-->
											<!--</div>-->
										<!--</dt>-->
										<!--<dd>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2">这里显示技术名称，这里显示技术名称</div>-->
												<!--<div class="col-xs-2">湖北</div>-->
												<!--<div class="col-xs-2">生活消费</div>-->
												<!--<div class="col-xs-2">2015-06-11</div>-->
												<!--<div class="col-xs-2">30万</div>-->
												<!--<div class="col-xs-2">已发送的申请</div>-->
											<!--</div>-->
										<!--</dd>-->
										<!--</dl>-->
									<!--</div>-->
								<!--</div>-->
								<!---->
								<!--&lt;!&ndash;投资人&ndash;&gt;-->
								<!--<div class="tab-pane fade" id="touzi">-->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">创业领域:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
											<!--<tr><td class="active">全部</td><td>电子商务</td><td>产品 A</td><td>企业服务</td><td>ARVR</td><td>生活消费</td><td>内容产业</td><td>pre-轮</td><td>游戏动漫</td><td>移动互联网</td><td>社交</td></tr>-->
												<!--<tr><td>硬件</td><td>教育</td><td>交通出行</td><td>医疗健康</td><td>旅游户外</td><td>工具软件</td><td>房产</td><td>不明确</td><td>尚未或投</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
								<!---->
								<!---->
									<!--<div class="tab_creat row tab_font">-->
										<!--<div class="col-xs-2 text-right" style="padding: 8px 15px;">排序:</div>-->
										<!--<div class="col-xs-10" style="padding: 0;">-->
											<!--<table class="table">-->
												<!--<tr><td class="active">全部</td><td>最新收录</td><td>热度</td></tr>-->
											<!--</table>-->
										<!--</div>-->
									<!--</div>-->
							<!---->
									<!---->
									<!--<div class="row gongsi_list">-->
										<!--<dl style="background-color: #fff;">-->
										<!--<dt>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2">投资机构</div>-->
												<!--<div class="col-xs-2">投资案例</div>-->
												<!--<div class="col-xs-2">投资偏好</div>-->
												<!--<div class="col-xs-2">投资领域</div>-->
												<!--<div class="col-xs-2">成立时间</div>-->
												<!--<div class="col-xs-2">关注</div>-->
											<!--</div>-->
										<!--</dt>-->
										<!--<dd>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2" style="padding-top: 10px;">-->
													<!--<div class="media">-->
													  <!--<div class="media-left media-middle">-->
													    <!--<a href="#">-->
													     <!--<img src="../img/carous.png" style="width: 40px;height: 40px;"/> -->
													    <!--</a>-->
													  <!--</div>-->
													  <!--<div class="media-body">-->
													    <!--<span>小橙科技</span>-->
													<!---->
													  <!--</div>-->
													<!--</div>-->
													<!---->
												<!--</div>-->
												<!--<div class="col-xs-2">2</div>-->
												<!--<div class="col-xs-2">天使轮</div>-->
												<!--<div class="col-xs-2">电子商务</div>-->
												<!--<div class="col-xs-2">2015-06-11</div>-->
												<!--<div class="col-xs-2"><button class="btn btn-default ">关注</button></div>-->
											<!--</div>-->
										<!---->
										<!--</dd>-->
											<!--<dd>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2"><img src="../img/carous.png" style="width: 40px;height: 40px;"/> <span>小橙科技</span></div>-->
												<!--<div class="col-xs-2">2</div>-->
												<!--<div class="col-xs-2">天使轮</div>-->
												<!--<div class="col-xs-2">电子商务高科技</div>-->
												<!--<div class="col-xs-2">2015-06-11</div>-->
												<!--<div class="col-xs-2"><button class="btn btn-default ">关注</button></div>-->
											<!--</div>-->
										<!---->
										<!--</dd>-->
											<!--<dd>-->
											<!--<div class="row">-->
												<!--<div class="col-xs-2"><img src="../img/carous.png" style="width: 40px;height: 40px;"/> <span>小橙科技</span></div>-->
												<!--<div class="col-xs-2">2</div>-->
												<!--<div class="col-xs-2">天使轮</div>-->
												<!--<div class="col-xs-2">电子商务高科技</div>-->
												<!--<div class="col-xs-2">2015-06-11</div>-->
												<!--<div class="col-xs-2"><button class="btn btn-default ">关注</button></div>-->
											<!--</div>-->
										<!---->
										<!--</dd>-->
										<!--</dl>-->
									<!--</div>-->
									<!---->
									<!---->
								<!--</div>-->
								<!---->
						<!---->
							<!--</div>-->
						<!--</div>-->
					<!---->
				<!--</div>-->
					<!---->
			<!---->
		<!--</div>-->
		</div>
	</body>
	<script src="../js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
	<script type="text/javascript" src="../js/bootstrap-paginator.min.js" ></script>
	<script type="text/javascript" src="../js/public.js"></script>
	<script type="text/javascript">
		var person = JSON.parse(sessionStorage.getItem("person"));
		var login=0;
		if (person==''||person==null) {
//			alert('请先登录')
//			 window.location.href='denglu.html';
		} else{
			login=1;
			var userId = person.userid;
			console.log(userId);
			$('#userId').val(userId)

		}

		//		$('.gongsi_list').on('click','.btn.btn-default',function(){
		//			if ($(this).text()=='关注') {
		//				$(this).css({"backgroundColor":"#6bc50d","color":'#fff'}).text('已关注')
		//			} else{
		//				$(this).css({"backgroundColor":"#fff","color":'#6bc50d'}).text('关注')
		//			}
		//		});



		//技术成果
		//		融资阶段
		$('.rongzi').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		});

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/financingStage",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.rongzi').append(htmls);
			}
		});
		foldetoggle('.rongzi li:gt(9)','.financingFolded')


		function foldetoggle(select,selectFun) {
			$(select).hide()
			$(selectFun).on('click',function () {
				$(select).slideToggle()
				$(this).toggleClass('foldedtog');
			})
		}



		//创业领域
		$('.creat_area').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		})

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/field",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.creat_area').append(htmls);
			}
		});
		foldetoggle('.creat_area li:gt(9)','.bussinessFolded')

		//地区
		$('.areas').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		})

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/area",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.areas').append(htmls);
			}
		});
		foldetoggle('.areas li:gt(9)','.areaFolded')

		//排序
		$('.order li:eq(0)').addClass('active')
		$('.order').on('click','li',function(){
			$(this).addClass('active').siblings().removeClass('active');
		})
		foldetoggle('.order li:gt(9)','.orderFolded')

		$('#startSearch').on('click',function(){
			var orderIndex =  $('.order').find('li').filter('.active').index();
			var obj = {};
			obj.financingStage=getChooseId('.rongzi');
			obj.field=getChooseId(".creat_area");
			obj.area=getChooseId('.areas');
			obj.order=orderIndex;
			obj.creatTime=$('#creatTime').val();
			obj.keyword=$('#keyword').val();
			obj.userId=userId;
			var apiUrl ="http://114.112.96.184:18080/achievement";
			getpbList(obj,1,10,apiUrl,'#company_list');
		});



		getpbList({'userId':userId},1,10,"http://114.112.96.184:18080/achievement",'#company_list');
		//成果列表
		function getpbList(objs,page,pageSize,apiUrl,select){
			objs.index=page;
			objs.size=pageSize;
			$.ajax({
				type: "get",
				data:objs,
				url:apiUrl,
				async: false,
				error: function(request) {
					console.log("Connection error");
				},
				success: function(data) {
					console.log(data)
					var pages=Math.ceil(data.result.totalElements/10);

					if(pages<=1){
						$("#page").hide();
					}else{
						$("#page").show();
					}
					var options={
						bootstrapMajorVersion:3,
						currentPage:page,    //当前页数
						numberOfPages:10,
						totalPages:pages,    //所有数据可以显示的页数
						tooltipTitles:function(){
						},
						itemTexts: function (type, page, current) {
							switch (type) {
								case "prev": return "←上一页";
								case "next": return "下一页→";
								case "page": return page;
							}
						},
						shouldShowPage:function(type, page, current){
							switch(type)
							{
								case "first":
								case "last":
									return false;
								default:
									return true;
							}
						},
						onPageClicked:function(event, originalEvent, type,page){
							console.log(page)
							console.log(objs)
							objs.index=page;
							$.ajax({
								type: "get",
								data: objs,
								url: apiUrl,
								async: false,
								error: function (request) {
									console.log("Connection error");
								}, success: function (data) {

									var obj = data.result.content;
									var htmls='';
									for (var i = 0; i < obj.length;i++) {
										var createTime =obj[i].createTime.substring(0,10)
										var attention='';
										var pbName = '';
										pbName=obj[i].achievementName;
										if (pbName.length>4){
											pbName=pbName.substring(0,4) + '...'
										}
										if (obj[i].attention==true) {
											attention='取消关注';
										} else{
											attention='关注';
										}
										if(obj[i].userId==userId){
											attention='我的成果';
										}
										htmls+= '<dd>'+
												'<div class="row">'+
												'<div class="col-xs-3" style="padding-top:3px ;"><img src="'+obj[i].logo +'"  onerror="onErrorHandle(this)" style="width: 40px;height: 40px;" /> <a href="xqfb_resultDetails.html?'+obj[i].id +'" pbId="'+ obj[i].id+'" title="'+obj[i].achievementName+'">'+ pbName+'</a></div>'+
												'<div class="col-xs-2">'+obj[i].area+'</div>'+
												'<div class="col-xs-3">'+ obj[i].field+ '</div>'+
												'<div class="col-xs-2">'+ createTime+'</div>'+
												'<div class="col-xs-2">'+ obj[i].price+'</div>'+
												'</dd>'
									}
									$(select).html(htmls);

								}
							});

						}
					}
					if(data.result.totalElements>0){
						$("#page").bootstrapPaginator(options);
					}
					var obj = data.result.content;
					var htmls='';
					for (var i = 0; i < obj.length;i++) {
						var createTime =obj[i].createTime.substring(0,10)
						var attention='';
						var pbName = '';
						pbName=obj[i].achievementName;
						if (pbName.length>4){
							pbName=pbName.substring(0,4) + '...'
						}
						if (obj[i].attention==true) {
							attention='取消关注';
						} else{
							attention='关注';
						}
						if(obj[i].userId==userId){
							attention='我的成果';
						}
						htmls+= '<dd>'+
								'<div class="row">'+
								'<div class="col-xs-3" style="padding-top:3px ;"><img src="'+obj[i].logo +'"  onerror="onErrorHandle(this)" style="width: 40px;height: 40px;" /> <a href="xqfb_resultDetails.html?'+obj[i].id +'" pbId="'+ obj[i].id+'" title="'+obj[i].achievementName+'">'+ pbName+'</a></div>'+
								'<div class="col-xs-2">'+obj[i].area+'</div>'+
								'<div class="col-xs-3">'+ obj[i].field+ '</div>'+
								'<div class="col-xs-2">'+ createTime+'</div>'+
								'<div class="col-xs-2">'+ obj[i].price+'</div>'+
								'</dd>'
					}
					$(select).html(htmls);

				}
			});
		}



		function getChooseId (select){
			var obj =	$(select).find('li').filter('.active');
			var rongzi_value = "";
			for (var i = 0; i < obj.length;i++) {
				rongzi_value+= obj[i].getAttribute('chooseid')+ ','
			}
			rongzi_value=rongzi_value.substring(0,rongzi_value.length-1)
			return rongzi_value;
		}



		//技术需求
		//投资领域部分
		$('.touzhi_area').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		})

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/field",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.touzhi_area').append(htmls);
			}
		});
		foldetoggle('.touzhi_area li:gt(9)','.tutorInvesetFolded')
		//融资阶段部分

		$('.rongzi_touzi').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		});

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/financingStage",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.rongzi_touzi').append(htmls);
			}
		});
		foldetoggle('.rongzi_touzi li:gt(9)','.tutorFinancingFolded');
		//地区
		$('.areas_touzi').on('click','li',function(){
//			if ($(this).hasClass("active")) {
//				$(this).removeClass('active')
//			}else{
//				$(this).addClass('active')
//			}
			$(this).addClass('active').siblings().removeClass('active');
		});

		$.ajax({
			type: "get",
			url:"http://114.112.96.184:18080/dict/area",
			async: false,
			error: function(request) {
				console.log("Connection error");
			},
			success: function(data) {
				console.log(data)
				var obj = data.result;
				var htmls='';
				for (var i = 0; i < obj.length;i++) {
					htmls+= '<li  chooseId="'+ obj[i].id+'">'+ obj[i].value +'</li>'
				}
				$('.areas_touzi').append(htmls);
			}
		});
		foldetoggle('.areas_touzi li:gt(9)','.tutorAreaFolded')
		//排序
		$('.order_touzi li:eq(0)').addClass('active');
		$('.order_touzi').on('click','li',function(){
			$(this).addClass('active').siblings().removeClass('active');
		});
		foldetoggle('.order_touzi li:gt(9)','.tutorOrderFolded');




		$('#startSearch_touzi').on('click',function(){
			console.log(getChooseId('.rongzi_touzi')) ;
			console.log(getChooseId(".touzhi_area"));
			console.log(getChooseId('.areas_touzi'));
			var orderIndex =  $('.order_touzi').find('li').filter('.active').index();
			console.log(orderIndex);
			var obj = {};
			obj.financingStage=getChooseId('.rongzi_touzi');
			obj.field=getChooseId(".touzhi_area");
			obj.area=getChooseId('.areas_touzi');
			obj.year=$('#techniqueDemand').val();
			obj.order=orderIndex;
			obj.userId=userId;
			obj.keyword=$('#keyword').val();
			console.log(obj);
			apiUrl="http://114.112.96.184:18080/demand";
			getInvestList(obj,1,10,apiUrl,'#touzi_list');
		});
		getInvestList({'userId':userId},1,10,"http://114.112.96.184:18080/demand",'#touzi_list');
		function getInvestList(objs,page,pageSize,apiUrl,select){
			objs.index=page;
			objs.size=pageSize;
			$.ajax({
				type: "get",
				data:objs,
				url:apiUrl,
				async: false,
				error: function(request) {
					console.log("Connection error");
				},
				success: function(data) {
					console.log(data)
					var pages=Math.ceil(data.result.totalElements/10);
					if(pages<=1){
						$("#pageInvest").hide();
					}else{
						$("#pageInvest").show();
					}
					var options= {
						bootstrapMajorVersion: 3,
						currentPage: page,    //当前页数
						numberOfPages: 10,
						totalPages: pages,    //所有数据可以显示的页数
						tooltipTitles: function () {
						},
						itemTexts: function (type, page, current) {
							switch (type) {
								case "prev":
									return "←上一页";
								case "next":
									return "下一页→";
								case "page":
									return page;
							}
						},
						shouldShowPage: function (type, page, current) {
							switch (type) {
								case "first":
								case "last":
									return false;
								default:
									return true;
							}
						},
						onPageClicked: function (event, originalEvent, type, page) {
							objs.index=page;
							$.ajax({
								type: "get",
								data: objs,
								url: apiUrl,
								async: false,
								error: function (request) {
									console.log("Connection error");
								},
								success: function (data) {
									var obj = data.result.content;
									var htmls='';
									for (var i = 0; i < obj.length;i++) {
										var createTime =obj[i].createTime.substring(0,10);
										var attention='';
										if (obj[i].attention==true) {
											attention='取消关注'
										} else{
											attention='关注'
										}
										htmls+= '<dd>'+
												'<div class="row">'+
												'<div class="col-xs-3" style="padding-top:3px ;"><img src="'+obj[i].avatar +'" onerror="onErrorHandle(this)" style="width: 40px;height: 40px;"/> <a href="xqfb_demandDetail.html?'+obj[i].userId +'" pbId="'+ obj[i].id+'" >'+ obj[i].realName+'</a></div>'+
												'<div class="col-xs-2">'+obj[i].case+'</div>'+
												'<div class="col-xs-3">'+ obj[i].preference +'</div>'+
												'<div class="col-xs-2">'+ obj[i].field+'</div>'+
												'<div class="col-xs-2">'+ createTime+'</div>'+
												'</dd>'
									}
									$(select).html(htmls);


								}
							})


						}
					};
					if(data.result.totalElements>0){
						$("#pageInvest").bootstrapPaginator(options);
					}
					var obj = data.result.content;
					var htmls='';
					for (var i = 0; i < obj.length;i++) {
						var createTime =obj[i].createTime.substring(0,10);
						var attention='';
						if (obj[i].attention==true) {
							attention='取消关注'
						} else{
							attention='关注'
						}
						if(obj[i].userId==userId){
							attention='我';
						}
						htmls+= '<dd>'+
								'<div class="row">'+
								'<div class="col-xs-3" style="padding-top:3px ;"><a href="xqfb_demandDetail.html?'+obj[i].userId +'" pbId="'+ obj[i].id+'" >'+ obj[i].demandProfile+'</a></div>'+
								'<div class="col-xs-2">'+obj[i].area+'</div>'+
								'<div class="col-xs-3">'+ obj[i].field +'</div>'+
								'<div class="col-xs-2">'+ createTime+'</div>'+
								'<div class="col-xs-2">'+ obj[i].price+'</div>'+
								'</dd>'
					}
					$(select).html(htmls);

				}
			});
		}







		//关注项目
		$(document).on('click','.attentionPb',function () {
			if (person==''||person==null) {
				window.location.href='denglu.html';
				return;
			}
			if ($(this).text()=='我的项目'){
				return false;
			}
			var id = $(this).attr('attentionId');

			if($(this).text()=='关注'){
				$(this).text('取消关注')
			}else {
				$(this).text('关注')
			}
			attentionPb();
			function attentionPb() {
				$.ajax({
					type: "post",
					data:{'userId':userId},
					url:"http://114.112.96.184:18080/auth/attentionPb/"+id,
					async: false,
					error: function(request) {
						console.log("Connection error");
					},
					success: function(data) {
						console.log(data);

					}
				});
			}

		});


		//关注投资人
		$(document).on('click','.attentionInvest',function () {
			if (person==''||person==null) {
				window.location.href='denglu.html';
				return;
			}
			if ($(this).text()=='我'){
				return false;
			}
			var id = $(this).attr('attentionId');

			if($(this).text()=='关注'){
				$(this).text('取消关注')
			}else {
				$(this).text('关注')
			}
			attentionInvest();
			function attentionInvest() {
				$.ajax({
					type: "post",
					data:{'userId':userId},
					url:"http://114.112.96.184:18080/auth/attentionInvest/"+id,
					async: false,
					error: function(request) {
						console.log("Connection error");
					},
					success: function(data) {
						console.log(data);

					}
				});
			}

		});


		//图片加载失败情况
		function onErrorHandle(obj){
			obj.src="../img/defaultAvatar.png";
		}
	</script>
</html>
